<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>后台管理系统——登录</title>
		<script type="text/javascript">
			function checkValue(){
				var nm = document.login.name;
				var name = nm.value.trim();

				if (name.length===0){
					alert("用户名不能为空！");
					nm.focus();
					return false;
				}

				var pw = document.login.psw;
				var psw = pw.value.trim();

				if (psw.length===0){
					alert("密码不能为空！");
					pw.focus();
					return false;
				}

				return true;
			}
			
			function load(){
				document.login.name.focus();
			}
		</script>
    </head>
    <body onload="javascript:load();">
		<div style="width:100%;height:100px;"></div>
		<div style="width:100%;height:auto;text-align:center;">
			<div style="margin-left:auto;margin-right:auto;width:370px;height:210px;background:#f6f6f6;border:1px solid #90BDFF;">
				<div style="width:100%;height:35px;line-height:35px;background:#90BDFF;border-bottom:1px solid #90BDFF;">
					后台管理系统登录
				</div>
				<div style="width:100%;height:15px;"></div>
				<form name="login" action="./login.php" method="POST" onsubmit="javascript:return checkValue();">
				<div style="width:100%;height:50px;line-height:50px;">
					<div style="float:left;width:100px;height:100%;text-align:right;">用户名：</div>
					<div style="float:left;width:200px;height:100%">
						<input type="text" name="name" value="" style="width:100%;height:23px;line-height:23px;border:1px solid #dddddd;"/>
					</div>
				</div>
				<div style="width:100%;height:50px;line-height:50px;">
					<div style="float:left;width:100px;height:100%;text-align:right;">密码：</div>
					<div style="float:left;width:200px;height:100%">
						<input type="password" name="psw" style="width:100%;height:23px;line-height:23px;border:1px solid #dddddd;"/>
					</div>
				</div>
				<div style="width:100%;height:50px;line-height:50px;">
					<div style="float:left;width:100px;height:100%;text-align:right;"></div>
					<div style="float:left;width:200px;height:100%">
						<input type="submit" style="width:100px;height:25px;line-height:25px;" value="登录"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					</div>
				</div>
				</form>
				<div style="width:100%;height:20px;"></div>
				<div style="width:100%;height:30px;color:red;"></div>
			</div>
		</div>
    </body>
</html>
